//============================================================================
// Name        : binary_file.cpp
// Author      : contro
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include"khaibao.h"

int main() {
	int n;
	cout<<"input numbers of student: ";
	cin>>n;

	student_t *st,*sv;
	st=new student_t [n];
	sv=new student_t [n];
	Nhap(st,n);

	ofstream write("student.txt",ios::binary);
	write.write((char*)&st,sizeof(st));
	write.close();

	ifstream read("student.txt",ios::binary);
	read.read((char*)&sv,sizeof(sv));
	read.close();

	Xuat(sv,n);
	cout<<"\n\nkq tim kiem: ";
	TimKiem(sv,n,22);
	SapXep(sv,n);
	cout<<"\n\nkq sap xep: ";
	Xuat(sv,n);
	//delete(st);

	return 0;
}
